<template>
  <div ref="el" class="auto-bg" :class="{ 'card-border': border }">
    <slot :height="height" :width="width"></slot>
  </div>
</template>

<script setup lang="ts">
import { useTemplateRef } from "vue";
import { useElementSize } from "@vueuse/core";

defineProps({
  border: {
    type: Boolean,
    default: false,
  },
});
const el = useTemplateRef("el");
const { width, height } = useElementSize(el);
</script>
